import java.util.Scanner;

public class da {


        public da() {
        }

        public static void main(String[] args) {
            Scanner scanner = new Scanner(System.in);
            int num1 = scanner.nextInt();
            int num2 = 1931;
            System.out.println(num1 - num2);
        }

}
